home *** CD-ROM | disk | FTP | other *** search
/ Sky at Night 2007 June / SAN CD 6-2007 CD-ROM 25.iso / pc / Software / AstroGrav_Win / Java / jre1.6.0 / lib / rt.jar / java / lang / StackTraceElement.class (.txt) < prev    next >
Encoding:
Java Class File  |  2006-11-29  |  1.7 KB  |  72 lines

  1. package java.lang;
  2.  
  3. import java.io.Serializable;
  4.  
  5. public final class StackTraceElement implements Serializable {
  6.    private String declaringClass;
  7.    private String methodName;
  8.    private String fileName;
  9.    private int lineNumber;
  10.    private static final long serialVersionUID = 6992337162326171013L;
  11.  
  12.    public StackTraceElement(String var1, String var2, String var3, int var4) {
  13.       if (var1 == null) {
  14.          throw new NullPointerException("Declaring class is null");
  15.       } else if (var2 == null) {
  16.          throw new NullPointerException("Method name is null");
  17.       } else {
  18.          this.declaringClass = var1;
  19.          this.methodName = var2;
  20.          this.fileName = var3;
  21.          this.lineNumber = var4;
  22.       }
  23.    }
  24.  
  25.    public String getFileName() {
  26.       return this.fileName;
  27.    }
  28.  
  29.    public int getLineNumber() {
  30.       return this.lineNumber;
  31.    }
  32.  
  33.    public String getClassName() {
  34.       return this.declaringClass;
  35.    }
  36.  
  37.    public String getMethodName() {
  38.       return this.methodName;
  39.    }
  40.  
  41.    public boolean isNativeMethod() {
  42.       return this.lineNumber == -2;
  43.    }
  44.  
  45.    public String toString() {
  46.       return this.getClassName() + "." + this.methodName + (this.isNativeMethod() ? "(Native Method)" : (this.fileName != null && this.lineNumber >= 0 ? "(" + this.fileName + ":" + this.lineNumber + ")" : (this.fileName != null ? "(" + this.fileName + ")" : "(Unknown Source)")));
  47.    }
  48.  
  49.    public boolean equals(Object var1) {
  50.       if (var1 == this) {
  51.          return true;
  52.       } else if (!(var1 instanceof StackTraceElement)) {
  53.          return false;
  54.       } else {
  55.          StackTraceElement var2 = (StackTraceElement)var1;
  56.          return var2.declaringClass.equals(this.declaringClass) && var2.lineNumber == this.lineNumber && method_0(this.methodName, var2.methodName) && method_0(this.fileName, var2.fileName);
  57.       }
  58.    }
  59.  
  60.    // $FF: renamed from: eq (java.lang.Object, java.lang.Object) boolean
  61.    private static boolean method_0(Object var0, Object var1) {
  62.       return var0 == var1 || var0 != null && var0.equals(var1);
  63.    }
  64.  
  65.    public int hashCode() {
  66.       int var1 = 31 * this.declaringClass.hashCode() + this.methodName.hashCode();
  67.       var1 = 31 * var1 + (this.fileName == null ? 0 : this.fileName.hashCode());
  68.       var1 = 31 * var1 + this.lineNumber;
  69.       return var1;
  70.    }
  71. }
  72.